Skip to content

feat: ai samples implenting text generation/chat samples - #1070

Merged
sedanah-m merged 10 commits into
feat/ai-samplesfrom
feat/ai-samples-impl-text-gen/chat
Jul 17, 2026
Merged

feat: ai samples implenting text generation/chat samples#1070
sedanah-m merged 10 commits into
feat/ai-samplesfrom
feat/ai-samples-impl-text-gen/chat

Conversation

@sedanah-m

@sedanah-m sedanah-m commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Implement text-generation and chat samples.
Add decoupled logic so that user can run script to start either sample.
Updates to the README file and adds AppCheck debug intialization.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a modular React and Vite-based application showcasing Firebase AI capabilities, including text generation and multi-turn chat. Feedback on the changes highlights several critical issues: an invalid model name ('gemini-3.5-flash') is used across multiple service files, which will cause runtime failures; the Chat view lacks error handling during initialization, potentially leading to application crashes; Firebase configuration values are hardcoded instead of using environment variables; and a deprecated @types/react-router-dom dependency is present, risking type conflicts with React Router v7.

Comment thread ai/ai-samples/src/services/firebaseAIService.ts
Comment thread ai/ai-samples/src/features/chat/service.ts
Comment thread ai/ai-samples/src/features/text-generation/service.ts
Comment thread ai/ai-samples/src/features/text-generation/service.ts
Comment thread ai/ai-samples/src/features/text-generation/service.ts
Comment thread ai/ai-samples/src/features/chat/index.tsx Outdated
Comment thread ai/ai-samples/src/services/firebaseAIService.ts Outdated
Comment thread ai/ai-samples/package.json
@sedanah-m sedanah-m changed the title Feat/ai samples impl text gen/chat feat: ai samples impl text gen/chat Jun 23, 2026
@sedanah-m
sedanah-m marked this pull request as ready for review June 23, 2026 21:20
@sedanah-m
sedanah-m changed the base branch from master to feat/ai-samples June 23, 2026 21:24
@sedanah-m
sedanah-m force-pushed the feat/ai-samples-impl-text-gen/chat branch from 75197b1 to 0b9284c Compare June 23, 2026 21:28
sedanah-m and others added 2 commits June 23, 2026 14:39
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@hsubox76 hsubox76 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apps look good so far.

Can you add instructions in the README.md about how to install and run the samples, and the different options? Cover

  1. how to put your project config in
  2. npm install
  3. how to run full app or individual samples
  4. where to go in the browser
  5. Can cut and paste code out of service.ts file for platform agnostic use

Also, add App Check debug initialization as we discussed (I guess just in firebaseAIService.ts).

Comment thread ai/ai-samples/src/services/firebaseAIService.ts Outdated
Comment thread ai/ai-samples/src/services/firebaseAIService.ts Outdated
Comment thread package.json Outdated
Comment thread ai/ai-samples/src/features/text-generation/service.ts
Comment thread ai/ai-samples/yarn.lock Outdated
@sedanah-m sedanah-m changed the title feat: ai samples impl text gen/chat feat: ai samples implenting text generation/chat samples Jul 15, 2026
Comment thread ai/ai-samples/src/services/firebaseAIService.ts
@sedanah-m
sedanah-m requested a review from rafikhan July 17, 2026 18:22
@rafikhan

Copy link
Copy Markdown

Looked this over with Christina. The general structure of the changes look good. Other items still need work but we'll handle those in separate PRs

@sedanah-m
sedanah-m merged commit 91f11c4 into feat/ai-samples Jul 17, 2026
8 of 9 checks passed
@sedanah-m
sedanah-m deleted the feat/ai-samples-impl-text-gen/chat branch July 17, 2026 21:22
sedanah-m added a commit that referenced this pull request Aug 10, 2026
* feat: add ai-samples skeleton with use-case feature folders

* feat: add text-generation and chat isolated samples

* feat: include skeleton for all features; add decoupled logic/scripts

* feat: ai samples implenting text generation/chat samples (#1070)

* feat: add text-generation and chat isolated samples

* feat: include skeleton for all features; add decoupled logic/scripts

* fix: handleResetChat in chat index.tsx

* Apply suggestion from @gemini-code-assist[bot]

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Apply suggestion from @gemini-code-assist[bot]

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* update: README, update correct dependency to npm instead of yarn, include app check logic in firebaseAIService

* fix model update

* Simplifies app check by removing dev enviornment check.

* removes the conditional check for existing Firebase app instances before initialization.

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* feat: multimodal feature with UI

* delete extra firebase-config.ts file

* fix: type safety and error handling in fileToGenerativePart

* format fix

* fix: double *

* fix: empty array defaulting; simplified code by converting files variable into array earlier

* update: Add comment about file size to viewer and point them to official Firebase SDK Documentation

* adds: structured output demo with JSON and enum schemas. adds: UI to switch between the modes, input prompts, and display the responses.

* update comment with firebase documentation

* fix: MIME type

* move comment about file size from index file to service file

* adjust error handling

* adds: structured output demo with JSON and enum schemas. adds: UI to switch between the modes, input prompts, and display the responses.

* feat(ai): add function calling service

* feat(ai): add UI component and standardize error handling

* fix: updated function-calling to handle parallel function-calling.

* delete comment

* Trigger Build

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants